function ccR_Warlock_CheckForMissingImmolate()
	local x
	if # tblPGetNearbyEnemies > 0 then
		for x = 0, # tblPGetNearbyEnemies do
			local obj = tblPGetNearbyEnemies[x]
			local vSpell = {GetSpellInfo(IMMOLATE)}
			if obj
			and obj:Exists()
			and (obj:IsTappedByPlayer() or (obj:GetTarget():Exists() and obj:GetTarget():GetName() == ccrPlayerName()))
			and obj:GetAura(vSpell[1]) == nil
			and Player:IsFacing(obj)
			and SpellCanAttack(IMMOLATE, obj)
			then
				return true
			end
		end
	else
		return false
	end					
end

function ccR_Warlock_ApplyMissingImmolate()
	local x
	if # tblPGetNearbyEnemies > 0 then
		for x = 0, # tblPGetNearbyEnemies do
			local obj = tblPGetNearbyEnemies[x]
			local vSpell = {GetSpellInfo(IMMOLATE)}
			if obj
			and obj:Exists()
			and (obj:IsTappedByPlayer() or (obj:GetTarget():Exists() and obj:GetTarget():GetName() == ccrPlayerName()))
			and obj:GetAura(vSpell[1]) == nil
			and Player:IsFacing(obj)
			and SpellCanAttack(IMMOLATE, obj)
			then
				obj:Target()
				obj:CastSpellByName(GetSpellInfo(IMMOLATE))
				return
			end
		end
	end
end